<!--订单详情-->
<div class="am-u-sm-12 widget main-w">
	<ol class="am-breadcrumb">
		<li>
			<a href="{:url('/admin/index')}">首页</a>
		</li>
		<li>
			<a href="{:url('index')}">调度中心</a>
		</li>
		<li>
			<a href="{:url('index')}">查看订单</a>
		</li>
		<li class="am-active">订单详情</li>
	</ol>
	<fieldset style="margin: 0;">
		<legend>订单信息</legend>
		<div class="am-u-sm-12">
			<div class="am-u-sm-4 am-text-truncate">
				<div class="order_key am-text-truncate">订单号：</div>{$order.order_no}
			</div>
			<div class="am-u-sm-4 am-text-truncate">
				<div class="order_key am-text-truncate">订单状态：</div>{if $order.order_state==1} 待审批 {elseif $order.order_state==2/} 已批准 {elseif $order.order_state==3/} 已拒绝 {elseif $order.order_state==4/} 待用车 {elseif $order.order_state==5/} 已派车 {elseif $order.order_state==6/} 接驾中 {elseif $order.order_state==7/} 已到达出发地 {elseif $order.order_state==8/} 已到达目的地 {elseif $order.order_state==9/} 待支付 {elseif $order.order_state==10/} 待评价 {elseif $order.order_state==11/}已完成 {elseif $order.order_state==12/}已取消 {elseif $order.order_state==13/}已终止 {elseif $order.order_state==14/}无效 {/if}
				
			</div>
			<div class="am-u-sm-4 am-text-truncate">
				<div class="order_key am-text-truncate">订单类型：</div>
				{if $order.order_type==1} 公务订单 {elseif $order.order_type==2/} 企业订单{elseif $order.order_type==3/} 个人订单{/if}
			
			</div>
		</div>
	</fieldset>
	<div class="am-tabs" data-am-tabs="{noSwipe: 1}" style="padding: 10px;">
		<ul class="am-tabs-nav am-nav am-nav-tabs">
			<li class="am-active">
				<a href="#tab1">下单信息</a>
			</li>

			<li>
				<a href="#tab2">跟进信息</a>
			</li>
		</ul>

		<div class="am-tabs-bd">
			<div class="am-tab-panel am-fade am-in am-active" id="tab1">
				<fieldset>
					<legend>基本信息</legend>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p am-text-nowrap"  style="overflow: auto;">
							<div class="order_key am-text-truncate">下单时间：</div>
							{$order.order_time?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">下单人：</div>
							{$order.orderer?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">车型：</div>
							{$order.car_type_name?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">用车类型：</div>
							
								{if $order.use_type==1} 行政执法
								{elseif $order.use_type==2/} 特殊公务
								{elseif $order.use_type==3/} 重要会议
								{elseif $order.use_type==4/} 机要通讯
								{elseif $order.use_type==5/} 视察调研
								{elseif $order.use_type==6/} 公务接待
								{elseif $order.use_type==7/} 应急公务
								{elseif $order.use_type==8/} 紧急就医
								{else/}暂无信息
								{/if}
							
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">乘客：</div>
							{if $order.passenger_name}
							<a class="passenger" data-id='{$order.passenger_id}'>{$order.passenger_name}</a>
							{else/}
							暂无信息
							{/if}
							
						</div>
						<div class="am-u-sm-3 cl-p" style="overflow: auto;">
							<div class="order_key am-text-truncate">电话：</div>
							{$order.passenger_phone?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p am-text-nowrap"  style="overflow: auto;">
							<div class="order_key am-text-truncate">出发地：</div>
							{$order.from_addr?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p am-text-nowrap"  style="overflow: auto;">
							<div class="order_key am-text-truncate">目的地：</div>
							{$order.to_addr|default='暂无信息'}
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">预估里程：</div>
							{if $order['pre_meter']}
								{$order['pre_meter'] / 1000} 公里
							{else/}
								暂无信息
							{/if}
						</div>
						<div class="am-u-sm-3 cl-p am-text-nowrap"  style="overflow: auto;">
							<div class="order_key am-text-truncate">乘车单位：</div>
							{$order.company_name?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">审批人：</div>
							{$order.approval?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">司机：</div>
							{if $order.driver_name}
							<a class="driver" data-id='{$order.driver_id}'>{$order.driver_name}</a>
							{else/}
							暂无信息
							{/if}
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">车牌：</div>
							{if $order.car_number}
							<a href="{:url('car/detail')}?car_id={$order.car_id}">{$order.car_number}</a>
							{else/}
							暂无信息
							{/if}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">汽车型号：</div>
							{$order.structure_name?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">评价：</div>
							{$order.evaluate?:"暂无信息"}
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">评星：</div>
							{$order.star?:"暂无信息"}
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-6 cl-p">
							<div class="order_key am-text-truncate">用车说明：</div>
							{$order.use_explain?:"暂无信息"}
						</div>

						<div class="am-u-sm-6 cl-p">
							<div class="order_key am-text-truncate">订单类别：</div>
							{$order.booking_type_name} - {$order.pay_type_name} - {$order.use_type_name}
						</div>
					</div>
					<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
						
						<div class="am-u-sm-12">
							<div class="order_key am-text-truncate">投诉建议：</div>
							{$order.proposal?:"暂无信息"}
						</div>
						
					</div>
					<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
						
						<div class="am-u-sm-12">
							<div class="am-text-truncate" style="float: left;">订单异常说明：</div>
							<div class="remark"><span class="remark1">{$order.exception_remark?:"暂无信息"}</span>
								<button class="am-btn am-btn-primary am-btn-xs remark_change">编辑</button>
							</div>
							<div class="change_order" style="display: none;">
							<textarea style="width:300px" placeholder="请输入订单异常说明" class="remark_val"></textarea>
							<button class="am-btn am-btn-primary am-btn-xs remark_sumbit">提交</button>
							<button class="am-btn am-btn-primary am-btn-xs remark_close">取消</button>
							</div>
						</div>
						<div class="am-u-sm-12">
							
						</div>
						
					</div>
				</fieldset>
				<fieldset>
					<legend>收费信息</legend>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">实际里程：</div>
							{$order.meter|round=###/1000,2|default=0}公里
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">用时：</div>
							<div class="use_time">
								{:floor($order.use_time/3600)==0?"":(floor($order.use_time/3600))}{if floor($order.use_time/3600)==0}{else/}小时{/if}
								{:floor($order.use_time-(floor($order.use_time/3600)*3600))/60==0?"0":ceil(($order.use_time-(floor($order.use_time/3600)*3600))/60)}
								{if floor($order.use_time-(floor($order.use_time/3600)*3600))/60==0}{else/}分钟{/if}
							</div>
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">订单费用：</div>
							{$order.passenger_money?$order.passenger_money:"0"}元
						</div>
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">折扣：</div>
							{$order.discount?$order.discount:"0"}
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						<div class="am-u-sm-3 cl-p">
							<div class="order_key am-text-truncate">低速行驶：</div>
							{$order.low_speed_time?$order.low_speed_time:"0"}分钟
						</div>
					</div>
					<div class="am-u-sm-12" style="margin-bottom: 10px;">
						{if $order.start_pic || $order.end_pic}
							<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
								<legend style="border: 0;margin: 0;font-size:18px ;color:#999;">里程表</legend>
								{if $order.start_pic}
								<div class="am-u-sm-6 cl-p">
									<img class="fileimg" data-magnify="1" src="/{$order.start_pic}" alt="开始里程" style="width: 300px;height: 100%;padding: 10px;" />
									<div class=" ">&nbsp;&nbsp;&nbsp;开始里程：{$order.start_mile} KM</div>
								</div>
								{/if}

								{if $order.end_pic}
								<div class="am-u-sm-6 cl-p">
									<img class="fileimg" data-magnify="1" src="/{$order.end_pic}" alt="结束里程" style="width: 300px;height: 100%;padding: 10px;" />
									<div class=" ">&nbsp;&nbsp;&nbsp;结束里程：{$order.end_mile} KM</div>
								</div>
								{/if}
							</div>
						{/if}

					{if $order.car_type==3||$order.car_type==5}
					<fieldset style="margin:0">
						<div class="am-u-sm-12" style="margin-bottom: 10px;">
							<legend style="border: 0;margin: 0;font-size:18px ;color:#999;">包车费用<small>(合计：{$order.passenger_money}元)</small></legend>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">夜间服务费：</div>
								{$order.chartered_night?$order.chartered_night:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">包车费用：</div>
								{$order.chartered_charge?$order.chartered_charge:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">包车公里数：</div>
								{$order.chartered_km?$order.chartered_km:"0"}公里
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">包车时长：</div>
								{$order.chartered_hour?$order.chartered_hour:"0"}
								{:floor($order.chartered_hour/3600)==0?"":(floor($order.chartered_hour/3600))}{if floor($order.chartered_hour/3600)==0}{else/}小时{/if}
								{:floor($order.chartered_hour-(floor($order.chartered_hour/3600)*3600))/60==0?"0":ceil(($order.chartered_hour-(floor($order.chartered_hour/3600)*3600))/60)}
								{if floor($order.chartered_hour-(floor($order.chartered_hour/3600)*3600))/60==0}{else/}分钟{/if}
							</div>
						</div>
						<div class="am-u-sm-12" style="margin-bottom: 10px;">
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">超时价：</div>
								{$order.chartered_overtime?$order.chartered_overtime:"0"}
								
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">超程费用：</div>
								{$order.chartered_overrun?$order.chartered_overrun:"0"}
							</div>
							<div class="am-u-sm-6 cl-p"></div>
							
						</div>
						
					</fieldset>
					{/if}

					</div>
					<fieldset style="margin:0">
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<legend style="border: 0;margin: 0;font-size:18px ;color:#999;">乘客费用<small>(合计：{$order.passenger_money}元)</small></legend>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">起步价：</div>
								{$order.start_fee?$order.start_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">等待费用：</div>
								{$order.wait_fee?$order.wait_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">夜间行驶费：</div>
								{$order.night_fee?$order.night_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">低速行驶费：</div>
								{$order.low_fee?$order.low_fee:"0"}元
							</div>
						</div>
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">时长费：</div>
								{$order.time_fee?$order.time_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">远途费：</div>
								{$order.remote_fee?$order.remote_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">取消费：</div>
								{$order.cancel_fee?$order.cancel_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">里程费：</div>
								{$order.travel_fee?$order.travel_fee:"0"}元
							</div>
						</div>
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">路桥费：</div>
								{$order.toll?$order.toll:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">高速费：</div>
								{$order.high_fee?$order.high_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">停车费：</div>
								{$order.park_fee?$order.park_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">其他费：</div>
								{$order.other_fee?$order.other_fee:"0"}元
							</div>
						</div>
					</fieldset>
					<fieldset style="margin:0">
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<legend style="border: 0;margin: 0;font-size:18px ;color:#999;">司机收入<small>(合计：{$order.driver_money}元)</small></legend>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">起步价：</div>
								{$order.start_fee2?$order.start_fee2:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">里程费：</div>
								{$order.travel_fee2?$order.travel_fee2:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">夜间行驶费：</div>
								{$order.night_fee2?$order.night_fee2:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">低速行驶费：</div>
								{$order.low_fee2?$order.low_fee2:"0"}元
							</div>
						</div>
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">时长费：</div>
								{$order.time_fee2?$order.time_fee2:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">远途费：</div>
								{$order.remote_fee2?$order.remote_fee2:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">取消费：</div>
								{$order.cancel_fee?$order.cancel_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">候客费：</div>
								{$order.wait_fee2?$order.wait_fee2:"0"}元
							</div>
							
						</div>
						<div class="am-u-sm-12 cl-p" style="margin-bottom: 10px;">
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">路桥费：</div>
								{$order.toll?$order.toll:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">高速费：</div>
								{$order.high_fee?$order.high_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">停车费：</div>
								{$order.park_fee?$order.park_fee:"0"}元
							</div>
							<div class="am-u-sm-3 cl-p">
								<div class="order_key am-text-truncate">其他费：</div>
								{$order.other_fee?$order.other_fee:"0"}元
							</div>
						</div>
					</fieldset>
				</fieldset>
			</div>
			<div class="am-tab-panel am-fade" id="tab2">
				<div class="am-u-sm-8">
					<table width="100%" class="am-table am-table-compact am-table-bordered am-table-radius am-table-striped tpl-table-black ">
						<thead>
							<tr>
								<th>订单进度</th>
								<th>具体时间</th>
							</tr>
						</thead>
						<tbody>
							{if $order.apply_time}
							<tr>
								<td>申请时间</td>
								<td>{$order.apply_time}</td>
							</tr>
							{/if}
							{if $order.approval_time}
							<tr>
								<td>批准时间</td>
								<td>{$order.approval_time}</td>
							</tr>
							{/if}
							{if $order.orders_time}
							<tr>
								<td>接单时间</td>
								<td>{$order.orders_time}</td>
							</tr>
							{/if}
							{if $order.arrival_time}
							<tr>
								<td>到达时间</td>
								<td>{$order.arrival_time}</td>
							</tr>
							{/if}
							{if $order.ride_time}
							<tr>
								<td>乘车时间</td> 
								<td>{$order.go_time}</td>
							</tr>
							{/if}
							{if $order.payment_time}
							<tr>
								<td>支付时间</td>
								<td>{$order.payment_time}</td>
							</tr>
							{/if}
							{if $order.complete_time}
							<tr>
								<td>完成时间</td>
								<td>{$order.arrival_time}</td>
							</tr>
							{/if}
							{if $order.cancel_time}
							<tr>
								<td>取消时间</td>
								<td>{$order.cancel_time | date='Y-m-d H:i:s', ###}</td>
							</tr>
							{/if}
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	<div class="am-u-sm-12">
		<!--<a href="{:url('add',['order_id'=>$order.order_id])}" class="am-btn am-btn-sm am-btn-primary am-radius">修改订单</a>-->
		{if $Think.get.target}
		<a class="am-btn am-btn-sm am-btn-secondary am-radius closewindow">返回</a>
		{else/}
		<a class="am-btn am-btn-sm am-btn-secondary am-radius back">返回</a>
		{/if}
	</div>
</div>